Repository navigation
fix(libkernel): accept guest socket addresses whatever their sa_len - #1088
Merged
Merged
Conversation
The FreeBSD kernel ignores sa_len in a socket address passed in and sets it from the length argument, so titles may leave it 0. Only the family and the length argument decide the address kind now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
9 tasks done
This was referenced Oct 7, 2026
Contributor
|
Another title this fixes: the DOOM homebrew PPSA99666 v1.1.1 (lowbit/ps5-doom) zeroes its With the same change (I had made it independently before finding this PR), the server binds and, together with |
Collaborator
|
Checked: build + full ctest on current main + this PR (416/416), |
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
bind,connect,sendtoand the other socket calls rejected an address whosesa_lenbyte (byte 0) was not exactly 16 for IPv4 or 28 for IPv6. The FreeBSD kernel does not readsa_lenon input:getsockaddroverwrites it with the length argument. A title that leavessa_len0 gotEAFNOSUPPORT(47), which the console does not return for it.Now the family byte and the length argument alone decide the address kind; addresses returned to the guest still carry the correct
sa_len.guest_udp: binding127.0.0.1withsa_len0 succeeds andgetsocknamereportssa_len16.Title
PPSA17221 (Minecraft) needs #716 to load the modules in its app root, so every run below is current
main+ #716 + the PRs of this set (#1088, #1090–#1096), plus local changes outside it: dialog, NpAuth and TextToSpeech2 stubs that open PRs cover (#560, #925, #301) and a GPU end-of-pipe change that is not submitted. With all of them the title loads a world. The line below is from a run with only this PR left out, Windows 11, WinLibs GCC, normal user session.Without it the title crashes about 12 s after start:
With it, the title reaches a loaded world.
Tested
Debian 13 (WSL2), GCC 14.2.0, Release:
guest_udpandguest_tcppass. The new check fails onmainwithout the fix.Windows 11, WinLibs GCC: PPSA17221 with this PR and the rest of the set loads a world (runs described above). Not tested with Windows
ctest.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code